//
//  ScyRequestOperationManager.m
//  MoXiProject
//
//  Created by 沈晨宇 on 2017/7/17.
//  Copyright © 2017年 周筱雯. All rights reserved.
//

#import "ScyRequestOperationManager.h"

@implementation ScyRequestOperationManager
/*
 首页banner
 */
+(void)MainBannerParametersDic:(NSDictionary *)parameterDic
                       success:(void (^)(NSDictionary * result))successBlock
                      failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:MainBannerURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

//购彩
+(void)buyLotteryParametersDic:(NSDictionary *)parameterDic
                       success:(void (^)(NSDictionary * result))successBlock
                      failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:BuyLotteryURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
}

//获取最新一期购彩期号
+(void)LotteryBuyNumParametersDic:(NSDictionary *)parameterDic
                          success:(void (^)(NSDictionary * result))successBlock
                         failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:LotteryBuyNumURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

/*
 主页新闻
 */
+(void)MainNewsParametersDic:(NSDictionary *)parameterDic
                     success:(void (^)(NSDictionary * result))successBlock
                    failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:MainNewsURl finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

/*
 主页新闻详情
 */
+(void)MainNewsDetaiParametersDic:(NSDictionary *)parameterDic
                          success:(void (^)(NSDictionary * result))successBlock
                         failture:(void (^)(id result))failtureBlock{
    
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:MainNewsDetailsURl finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

/*
 主页新闻评论列表
 */
+(void)MainNewsFindAllDiscussParametersDic:(NSDictionary *)parameterDic
                                   success:(void (^)(NSDictionary * result))successBlock
                                  failture:(void (^)(id result))failtureBlock{
    
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:FindAllDiscussURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}
/*
 主页新闻添加评论
 */
+(void)MainNewsAddDiscussParametersDic:(NSDictionary *)parameterDic
                               success:(void (^)(NSDictionary * result))successBlock
                              failture:(void (^)(id result))failtureBlock{
    
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:NewsDiscussURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

/*
 主页新闻点赞
 */
+(void)MainNewsGivethumbsParametersDic:(NSDictionary *)parameterDic
                               success:(void (^)(NSDictionary * result))successBlock
                              failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:GivethumbsURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}
//大神
+(void)findUserBuyInfoParametersDic:(NSDictionary *)parameterDic success:(void (^)(NSDictionary * result))successBlock failture:(void (^)(id result))failtureBlock{
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:DEF_INTERFACE_FINDWINUSERPOSITION finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
}

//公告列表
+(void)noticeListParametersDic:(NSDictionary *)parameterDic success:(void (^)(NSDictionary * result))successBlock failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:MainNewsURl finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
}

/**
 收藏新闻
 */
+(void)SaveNewsCollectionParametersDic:(NSDictionary *)parameterDic
                               success:(void (^)(NSDictionary * result))successBlock
                              failture:(void (^)(id result))failtureBlock{

    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:SaveNewsCollectionURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];

}

/**
  取消收藏新闻
 */
+(void)DelNewsCollectionParametersDic:(NSDictionary *)parameterDic
                              success:(void (^)(NSDictionary * result))successBlock
                             failture:(void (^)(id result))failtureBlock{
    
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:DelNewsCollectionURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];
    
}

/**
 收藏新闻列表
 */
+(void)FindNewsCollectionParametersDic:(NSDictionary *)parameterDic
                               success:(void (^)(NSDictionary * result))successBlock
                              failture:(void (^)(id result))failtureBlock{
    [RequestHttpNetWrok requestPostWithParameters:parameterDic urlString:FindNewsCollectionURL finishHandle:^(id result) {
        successBlock(result);
    } failHandle:^(NSError *error) {
        failtureBlock(error);
    }];


}
@end
